import { Injectable } from '@angular/core';
import * as g from 'src/app/global/globalconst';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

export class PushMsgBPDtl{
  bill_type:string;client_name:string;product:string;specification:string;
  pairs:number;kilo:number;meter:number;
  working_company:string;pairsno:string;
}

const prefix = 'pushWhiteDtl';

@Injectable({
  providedIn: 'root'
})
export class PushmsgbpdtlService {

  url = {
    'dtl':g.server + '/' + prefix + '/dtl' // 染厂/单据编号/ERP中的客户编号
  }
  
  constructor(
    private http:HttpClient
  ) { }

  // 获取白坯入库单据明细数据
  getDetail(mill:string,billCode:string,clientSid:string):Observable<PushMsgBPDtl[]>{
    const url = this.url.dtl + '/' + mill + '/' + billCode + '/' + clientSid;
    return this.http.get<PushMsgBPDtl[]>(url);
  }
}
